﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataBase.Daihoctuonglai;

namespace dai_hoc_tuong_lai.Models
{
    public class ContactModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public string TieuDe { get; set; }
        public string NoiDung { get; set; }
        public Nullable<bool> Loailienhe { get; set; }
        public string DiaChi { get; set; }
        public string Dt { get; set; }
        public Nullable<System.DateTime> DateCreate { get; set; }
        public string trangthai { get; set; }

        public static void MapFrom(ContactModel model, ref Contact entity)
        {
            entity.Id = model.Id;
            entity.Name = model.Name;
            entity.TieuDe = model.TieuDe;
            entity.NoiDung = model.NoiDung;
            entity.Email = model.Email;
            entity.Dt = model.Dt;
            entity.DiaChi = model.DiaChi;
            entity.Loailienhe = model.Loailienhe;
            entity.DateCreate = model.DateCreate;
        }

        public static void MapFrom( Contact entity, ref ContactModel model)
        {
            model.Id = entity.Id;
            model.Name = entity.Name;
            model.TieuDe = entity.TieuDe;
            model.NoiDung = entity.NoiDung;
            model.Email = entity.Email;
            model.Dt = entity.Dt;
            model.DiaChi = entity.DiaChi;
            model.Loailienhe = entity.Loailienhe;
            model.DateCreate = entity.DateCreate;
        }
    }
}